<?php
  

   $connection = mysql_connect("localhost","wzj","") or die(mysql_error()) ;

   // (2) Select the winestore database
   mysql_select_db("winestore") or die(mysql_error()) ;

   // (3) Run the query on the winestore through the connection

   $a = "SELECT * FROM wine";
   $result = mysql_query ($a) or die(mysql_error()); 

   
   while ($row = mysql_fetch_array($result))
   {
     // (5) Print out each element in $row, that is, print the values of
     // the attributes
      foreach ($row as $key => $want)
         print "$want";

      // Print a carriage return to neaten the output
      print "<br>";
   }

?>
